#!/usr/bin/python
# coding = utf-8

NEED_RESCHED = 1

STARVATION_LIMIT = 1000

MAX_USER_RT_PRIO = 100
MAX_RT_PRIO = MAX_USER_RT_PRIO
MAX_PRIO = 140

MAX_USER_PRIO = MAX_PRIO - MAX_RT_PRIO 

PRIO_BONUS_RATIO = 25

MAX_BONUS = (MAX_USER_PRIO * PRIO_BONUS_RATIO / 100)

RT_RR = 0
RT_FIFO = 1
NORMAL = 2

state = {"INTERRUPTIBLE": 0, "UNINTERRUPTIBLE" : 1, "RUNNING" : 2, "EXIT" : 3}
policy = {"RR": 0, "FIFO": 1, "NORMAL": 2}

HZ = 100
GRANULARITY = max(10*HZ/1000, 1)

MIN_TIMESLICE = max(5 * HZ / 1000, 1)
DEF_TIMESLICE = 100*HZ/1000

MAX_SLEEP_AVG = DEF_TIMESLICE * MAX_BONUS
INTERACTIVE_DELTA = 2

ON_RUNQUEUE_WEIGHT = 30

TASK_DIR = "tasks"
TASK_IDLE = "idle.tsk"
